#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'''
习题5：输出奇数字母和偶数字母到两个列表中
'''

l = [(65,91),(97,123)]

def ascii_ouput():
    odd=[]
    even=[]
    for n in l:
        #元组拆包
        x,y = n
        for i in range(x,y):
            if i % 2 == 0:
                even.append(chr(i))
            else:
                odd.append(chr(i))
    return odd,even

if __name__ == '__main__':
    odd,even = ascii_ouput()
    print("奇数字母列表\n{}\n偶数字母列表\n{}".format(odd,even))
